{extend name="main_mobile"}
{block name="style"}
<style type="text/css">
	.flex-lable{width: 120px;color: #6c757d;text-align: right;padding-right: 10px;}
	.el-image-viewer__img{transition: all .3s; -moz-transition: all .3s; -webkit-transition: all .3s; -o-transition: all .3s;}
	.w-400px{width: 400px !important;}
	.el-drawer__body{height: 100%;}
	.RefuseWin .el-dialog{min-width: 768px;}
	.RefuseWin>.el-input, .RefuseWin>.el-select{width: 40%;}
	.el-date-editor.el-input, .el-date-editor.el-input__inner{width: 100%;}
	.el-image-viewer__mask{opacity: 1;background-color: #FFF;}
	.w-100px{width: 100px;}
</style>
{/block}
{block name="body"}
<div class="bg-white mb-3 table-responsive p-3">
	<el-form :model="search" @submit.native.prevent="submitForm" ref="search"
	label-position="right">

	<div class="flex flex-center">
		<div>
			<el-select v-model="search.search_type" placeholder="请选择" class="w-80px">
				<el-option key="uid"label="UID"value="uid"></el-option>
				<el-option key="id_number"label="身份证或统一社会信用代码"value="id_number"></el-option>
				<el-option key="name"label="名称"value="name"></el-option>
			</el-select>
		</div>
		<div class="mx-1 flex-1">
			<el-input v-model="search.key" placeholder="请输入你想搜索的关键词" clearable></el-input>
		</div>
		<el-button type="primary" @click="sendHtml">查询</el-button>
		<span class="text-nowrap px-2 py-3 small text-secondary"
		@click="searchMore= !searchMore">{{searchMore?'收起':'更多'}}</span>
	</div>
	<div v-show="searchMore" style="display: none;" class="mt-3">
		<el-form-item label="状态" prop="status">
			<el-select v-model="search.status" placeholder="请选择">
				<el-option key="all"label="全部"value="all"></el-option>
				<el-option :key="0"label="待审核":value="0"></el-option>
				<el-option :key="1"label="已通过":value="1"></el-option>
				<el-option :key="2"label="已拒绝":value="2"></el-option>
			</el-select>
		</el-form-item>
	</div>
</el-form>
</div>
<div class="bg-white mb-2 p-3" v-for="(v,index) in tableData">
	<div class="flex flex-center">
		<div class="flex flex-center flex-1">
			<el-image
			v-if="v.headimg" 
			style="width: 30px; height: 30px"
			lazy
			class="rounded-circle mr-2"
			:src="v.headimg" 
			:preview-src-list="[v.headimg]">
		</el-image>
		<div class="text-small">
			<div>{{v.nickname}}</div>
			<div>{{v.uid}}</div>
		</div>
	</div>
	<div class="text-secondary text-small">ID:{{v.id}}</div>
</div>
<div class="flex pt-2">
	<div class="flex-1 flex flex-center">
		<div class="w-50px text-grey">名称</div>
		<div class="flex-1">{{ v.name }}</div>
	</div>
	<div class="flex-1 flex flex-center">
		<div class="w-50px text-grey">图片</div>
		<div class="flex-1">
	      	<el-link type="primary" @click="openImageViewer(index);" :underline="false" v-if="v.img1||v.img2||v.img3||v.img4||v.img5">查看({{getImgSum(v)}})</el-link>
		</div>
	</div>
</div>
<div class="flex pt-2">
	<div class="flex-1 flex flex-center">
		<div class="w-100px text-grey">身份证或统一社会信用代码</div>
		<div class="flex-1 pl-2">
			<el-link type="primary" :href="'http://www.gsxt.gov.cn/corp-query-search-1.html?searchword='+v.id_number" :underline="false" v-if="v.id_type==1" target="_blank">{{v.id_number}}</el-link>
			<el-link type="info" :underline="false" v-else>{{v.id_number}}</el-link>
		</div>
	</div>
</div>
<div class="flex pt-2">
	<div class="flex-1 flex flex-center">
		<div class="w-50px text-grey">状态</div>
		<div class="flex-1">
			<span class="text-success" v-if="v.status==1">正常</span>
			<span class="text-danger" v-else-if="v.status==2">拒绝</span>
			<span class="text-info" v-else-if="v.status=='loading'" :loading="true">加载中</span>
			<span class="text-info" v-else>待审核</span>
		</div>
	</div>
	<div class="flex-1 flex flex-center">
		<div class="w-50px text-grey">身份</div>
		<div class="flex-1 flex flex-center">
			<span class="text-info" v-if="v.id_type==0">个人</span>
			<span class="text-primary" v-if="v.id_type==1">企业</span>
			<span class="text-secondary" v-if="v.id_type==2">其他组织</span>
		</div>
	</div>
</div>
<div class="flex pt-2">
	<div class="flex-1 flex flex-center">
		<div class="w-50px text-grey">联系人</div>
		<div class="flex-1">{{ v.contacts }}</div>
	</div>
	<div class="flex-1 flex flex-center">
		<div class="w-50px text-grey">手机号</div>
		<div class="flex-1">{{ v.mobile }}</div>
	</div>
</div>
<div class="flex pt-2">
	<div class="flex-1 flex flex-center">
		<div class="w-50px text-grey">地址</div>
		<div class="flex-1">{{v.area1}}{{v.area2}}{{v.area3}}{{v.address}}</div>
	</div>
</div>
<div class="flex pt-2">
	<div class="flex-1 flex flex-center">
		<div class="w-50px text-grey">创建</div>
		<div class="flex-1">{{ v.create_time }}</div>
	</div>
</div>
<div class="flex pt-2">
	<div class="flex-1 flex flex-center">
		<div class="w-50px text-grey">更新</div>
		<div class="flex-1">{{ v.update_time }}</div>
	</div>
</div>
<div class="flex flex-center pt-3">
	<div class="flex-1"></div>
	<el-button-group class="text-nowrap" v-if="v.status===0">
		<el-button type="success" size="mini" @click="setStatus(v,1)" :loading="v.status=='loading'">通过</el-button>
		<el-button type="danger" size="mini" @click="openRefuseWin(1,v,index)" :loading="v.status=='loading'">拒绝</el-button>
	</el-button-group>
	<el-button type="info" size="mini" @click="openRefuseWin(1,v,index)" :loading="v.status=='loading'" plain round
	v-if="v.status===1">取消实名</el-button>
</div>
</div>
<div class="table-responsive py-3 text-center">
	<el-pagination
	background
	@size-change="handleSizeChange"
	@current-change="handleCurrentChange"
	:current-page="search.page"
	:page-sizes="[10,50,100,200]"
	:page-size="search.pageSize"
	layout="total, sizes, prev, next"
	:total="search.total">
</el-pagination>
</div>
<el-dialog
title=""
:visible.sync="dialogVisible"
width="100%"
:with-header="false"
top="0"
custom-class="mb-0"
@close="cancelRefuseWinSubmit();">
<el-form :model="form" label-position="top" label-width="120px" :rules="rules" ref="form" size="small">
	<el-form-item label="名称" v-if="rowDataIndex!==null">{{rowData.name}}</el-form-item>
	<el-form-item label="身份证或统一社会信用代码" v-if="rowDataIndex!==null">
		<el-link type="primary" :href="'http://www.gsxt.gov.cn/corp-query-search-1.html?searchword='+rowData.id_number" :underline="false" v-if="rowData.id_type==1" target="_blank">{{rowData.id_number}}</el-link>
		<el-link type="info" :underline="false" v-else>{{rowData.id_number}}</el-link>
	</el-form-item>
	<el-form-item label="证件照片" v-if="rowDataIndex!==null">
		<div class="flex text-center table-responsive">
			<div class="px-1" v-if="rowData.img3">
				<el-image
				style="width: 100px; height: 120px;cursor: pointer;"
				class="border"
				:src="rowData.img3"
				fit="cover"
				@click="openImageViewer(rowDataIndex);"></el-image>
				<div class="small">营业执照</div>
			</div>
			<div class="px-1" v-if="rowData.img1">
				<el-image
				style="width: 100px; height: 120px;cursor: pointer;"
				:src="rowData.img1"
				fit="cover"
				@click="openImageViewer(rowDataIndex);"></el-image>
				<div class="small">身份证正面</div>
			</div>
			<div class="px-1" v-if="rowData.img2">
				<el-image
				style="width: 100px; height: 120px;cursor: pointer;"
				:src="rowData.img2"
				fit="cover"
				@click="openImageViewer(rowDataIndex);"></el-image>
				<div class="small">身份证反面</div>
			</div>
			<div class="px-1" v-if="rowData.img4">
				<el-image
				style="width: 100px; height: 120px;cursor: pointer;"
				:src="rowData.img4"
				fit="cover"
				@click="openImageViewer(rowDataIndex);"></el-image>
				<div class="small">承诺函</div>
			</div>
			<div class="px-1" v-if="rowData.img5">
				<el-image
				style="width: 100px; height: 120px;cursor: pointer;"
				:src="rowData.img5"
				fit="cover"
				@click="openImageViewer(rowDataIndex);"></el-image>
				<div class="small">补充材料</div>
			</div>
		</div>
		<div class="pt-2 text-secondary">
			<i class="el-icon-warning-outline mr-1 text-primary"></i>
			说明：点击图片查看原图
		</div>
	</el-form-item>
	<el-form-item label="审核"><span class="small text-danger">驳回申请</span></el-form-item>
	<el-form-item label="驳回原因" prop="msg">
		<el-input type="textarea" v-model="form.msg" class="col-12 pl-0 pr-0" :autosize="{ minRows: 4, maxRows: 20}" maxlength="200" show-word-limit></el-input>
	</el-form-item>
</el-form>
<div class="pointer text-primary small py-1" @click="showLog= !showLog;">{{showLog?'收起日志':'查看日志'}}</div>
<div v-show="showLog" style="max-height:400px;overflow-y: auto;">
	<div class="py-2 border-bottom mb-2" v-for="(v,index) in rowData.log">
		<div class="flex">
			<div class="text-secondary" v-if="v.status===0">提交申请</div>
			<div class="text-success" v-if="v.status===1">审核通过</div>
			<div class="text-danger" v-if="v.status===2">被驳回</div>
			<div class="flex-1 pl-2">{{v.nickname}}</div>
			<div class="small text-secondary">{{v.create_time}}</div>
		</div>
		<div class="pt-2">{{v.msg}}</div>
	</div>
</div>
<div slot="footer">
	<el-button @click="cancelRefuseWinSubmit();" size="mini">取 消</el-button>
	<el-button type="primary" @click="submitForm('form');" :loading="form.ajax" size="mini">{{form.ajax?'提交中...':'提交'}}</el-button>
</div>
</el-dialog>
<div class="el-image-viewer__wrapper" style="z-index: 20000;" v-if="viewer.index !== null">
	<div class="el-image-viewer__mask"></div>
	<span class="el-image-viewer__btn el-image-viewer__close" @click="closeImageViewer">
		<i class="el-icon-circle-close text-dark h4 mb-0"></i>
	</span>
	<span class="el-image-viewer__btn el-image-viewer__prev" @click="viewerPrev">
		<i class="el-icon-arrow-left"></i>
	</span>
	<span class="el-image-viewer__btn el-image-viewer__next" @click="viewerNext">
		<i class="el-icon-arrow-right"></i>
	</span>
	<div class="el-image-viewer__btn el-image-viewer__actions" :class="{'w-400px':tableData[viewer.index].status===0}">
		<div class="el-image-viewer__actions__inner" >
			<i class="el-icon-refresh" @click="viewerZoomRest"></i>
			<i class="el-icon-zoom-out" @click="viewerZoomOut"></i>
			<i class="el-icon-zoom-in" @click="viewerZoomIn"></i>
			<i class="el-image-viewer__actions__divider"></i>
			<i class="el-icon-full-screen" v-if="viewer.is_screen" @click="viewerIsScreen"></i>
			<i class="el-icon-c-scale-to-original" v-else @click="viewerIsScreen"></i>
			<i class="el-image-viewer__actions__divider"></i>
			<i class="el-icon-refresh-left" @click="viewerRotateLeft"></i>
			<i class="el-icon-refresh-right" @click="viewerRotateRight"></i>
			<i class="el-image-viewer__actions__divider" v-if="tableData[viewer.index].status===0"></i>
			<el-button-group class="text-nowrap" v-if="tableData[viewer.index].status===0">
				<el-button type="success" size="mini" @click="setStatus(tableData[viewer.index],1,viewerNext())" icon="el-icon-check" round></el-button>
				<el-button type="danger" size="mini" @click="openRefuseWinForViewer(3,tableData[viewer.index]);" icon="el-icon-close" round></el-button>
			</el-button-group>
			<el-button v-if="tableData[viewer.index].status===1" type="info" size="mini" @click="openRefuseWinForViewer(1,tableData[viewer.index])" icon="el-icon-delete" round></el-button>
		</div>
	</div>
	<div class="wrap h-100 w-100">
		<div class="text-center py-2 bg-white position-relative text" >
			<span class="text-primary mr-2" v-if="tableData[viewer.index].id_type==0">个人</span>
			<span class="text-primary mr-2" v-if="tableData[viewer.index].id_type==1">企业</span>
			<span class="text-primary mr-2" v-if="tableData[viewer.index].id_type==2">其他组织</span>【{{tableData[viewer.index].name}}】{{tableData[viewer.index].id_number}}
		</div>
		<div class="flex1 flex">
			<div class="el-image-viewer__canvas" v-if="tableData[viewer.index].img1">
				<img :src="tableData[viewer.index].img1" class="el-image-viewer__img" :style="getViewerStyle(1)" ref="viewerImage1" @mousewheel="viewerMousewheel($event,1)">
			</div>
			<div class="el-image-viewer__canvas" v-if="tableData[viewer.index].img2">
				<img :src="tableData[viewer.index].img2" class="el-image-viewer__img" :style="getViewerStyle(2)" ref="viewerImage2" @mousewheel="viewerMousewheel($event,2)">
			</div>
			<div class="el-image-viewer__canvas" v-if="tableData[viewer.index].img3">
				<img :src="tableData[viewer.index].img3" class="el-image-viewer__img" :style="getViewerStyle(3)" ref="viewerImage3" @mousewheel="viewerMousewheel($event,3)">
			</div>
			<div class="el-image-viewer__canvas" v-if="tableData[viewer.index].img4">
				<img :src="tableData[viewer.index].img4" class="el-image-viewer__img" :style="getViewerStyle(4)" ref="viewerImage4" @mousewheel="viewerMousewheel($event,4)">
			</div>
			<div class="el-image-viewer__canvas" v-if="tableData[viewer.index].img5">
				<img :src="tableData[viewer.index].img5" class="el-image-viewer__img" :style="getViewerStyle(5)" ref="viewerImage5" @mousewheel="viewerMousewheel($event,5)">
			</div>
			<div class="el-image-viewer__canvas text-dark" v-if="!tableData[viewer.index].img1&&!tableData[viewer.index].img2&&!tableData[viewer.index].img3&&!tableData[viewer.index].img4&&!tableData[viewer.index].img5">
				<div class="el-image-viewer__img" style="z-index:1">无认证图片</div>
			</div>
		</div>
	</div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
	var loading=null;
	var vm=new Vue({
		el:'#app',
		data:{
			view:XYBase.view,
			labelPosition:'right',
			showLog:false,
			searchMore:false,
			dialogVisible:false,
			viewer:{
				index:null,
				scale1:1,
				scale2:1,
				scale3:1,
				scale4:1,
				scale5:1,
				rotate:0,
				isDown:false,
				is_screen:true
			},
			multipleSelection:[],
			multipleSelectionIndex:0,
			search:{
				search_type:'uid',
				key:'{:request()->get('uid')}',
				status:{:request()->get('status',"\'all\'")},
				id_type:1,
				ajax:false,
				page:1,
				total:0,
				pageSize:10
			},
			rowDataIndex:null,
			rowData:{},
			form:{
				ajax:false,
				type:1,
				msg:''
			},
			tableData:[],
			rules: {
				msg: [
				{ required: true, message: '请输入审核结果', trigger: 'blur' },
				],
			}
		},
		watch:{
			view:XYBase.viewWatch,
		},
		created(){
			XYBase.created(this);
		},
		methods: {
			getImgSum(row){
				var sum=0;
				if (row.img1) sum++;
				if (row.img2) sum++;
				if (row.img3) sum++;
				if (row.img4) sum++;
				if (row.img5) sum++;
				return sum;
			},
			checkboxT(row,index){
				if(row.status==0){
					return true;
				}else{
					return false;
				}
			},
			toggleSelection(rows) {
				if (rows) {
					rows.forEach(row => {
						this.$refs.tableList.toggleRowSelection(row);
					});
				} else {
					this.$refs.tableList.clearSelection();
				}
			},
			handleSelectionChange(val) {
				this.multipleSelection = val;
			},
			getSearchType(){
				var text='UID';
				switch(this.search.search_type){
					case 'uid':
					text='UID';
					break;
					case 'id_number':
					text='身份证或统一社会信用代码';
					break;
					case 'name':
					text='名称';
					break;
				}
				return text;
			},
			getViewerStyle(index){
				var scale=1;
				switch(index){
					case 1:
					scale=this.viewer.scale1;
					break;
					case 2:
					scale=this.viewer.scale2;
					break;
					case 3:
					scale=this.viewer.scale3;
					break;
					case 4:
					scale=this.viewer.scale4;
					break;
					case 5:
					scale=this.viewer.scale5;
					break;
				}
				var style={
					transform:'scale('+scale+') rotate('+this.viewer.rotate+'deg)'
				};
				if (this.viewer.is_screen) {
					style.maxHeight='100%';
					style.maxWidth='100%';
				}
				return style;
			},
			closeImageViewer(){
				this.viewer.index=null;
			},
			openImageViewer(index){
				this.viewer.index=index;
				this.viewer.scale1=1;
				this.viewer.scale2=1;
				this.viewer.scale3=1;
				this.viewer.scale4=1;
				this.viewer.scale5=1;
				this.viewer.rotate=0;
				this.viewer.is_screen=true;
			},
			viewerMousewheel(event,index){
				var scale=1;
				switch(index){
					case 1:
					scale=this.viewer.scale1;
					break;
					case 2:
					scale=this.viewer.scale2;
					break;
					case 3:
					scale=this.viewer.scale3;
					break;
					case 4:
					scale=this.viewer.scale4;
					break;
					case 5:
					scale=this.viewer.scale5;
					break;
				}
				if (event.deltaY>0) {
					if (scale<=0.2)return;
					scale=scale-0.02;
				}else{
					scale=scale+0.02;
				}
				switch(index){
					case 1:
					this.viewer.scale1=scale;
					break;
					case 2:
					this.viewer.scale2=scale;
					break;
					case 3:
					this.viewer.scale3=scale;
					break;
					case 4:
					this.viewer.scale4=scale;
					break;
					case 5:
					this.viewer.scale5=scale;
					break;
				}
			},
			viewerZoomRest(){
				this.viewer.scale1=1;
				this.viewer.scale2=1;
				this.viewer.scale3=1;
				this.viewer.scale4=1;
				this.viewer.scale5=1;
				this.viewer.rotate=0;
			},
			viewerZoomOut(){
				if (this.viewer.scale1>0.3)
					this.viewer.scale1=this.viewer.scale1-0.2;
				if (this.viewer.scale2>0.3)
					this.viewer.scale2=this.viewer.scale2-0.2;
				if (this.viewer.scale3>0.3)
					this.viewer.scale3=this.viewer.scale3-0.2;
				if (this.viewer.scale4>0.3)
					this.viewer.scale4=this.viewer.scale4-0.2;
				if (this.viewer.scale5>0.3)
					this.viewer.scale5=this.viewer.scale5-0.2;
			},
			viewerZoomIn(){
				this.viewer.scale1=this.viewer.scale1+0.2;
				this.viewer.scale2=this.viewer.scale2+0.2;
				this.viewer.scale3=this.viewer.scale3+0.2;
				this.viewer.scale4=this.viewer.scale4+0.2;
				this.viewer.scale5=this.viewer.scale5+0.2;
			},
			viewerIsScreen(index){
				this.viewer.scale1=1;
				this.viewer.scale2=1;
				this.viewer.scale3=1;
				this.viewer.scale4=1;
				this.viewer.scale5=1;
				this.viewer.rotate=0;
				this.viewer.is_screen= !this.viewer.is_screen;
			},
			viewerRotateLeft(){
				this.viewer.rotate=this.viewer.rotate-90;
			},
			viewerRotateRight(){
				this.viewer.rotate=this.viewer.rotate+90;
			},
			viewerNext(){
				var index=this.viewer.index;
				if (this.tableData[this.viewer.index+1])
					this.viewer.index++;
				else
					XYBase.msg('已经是最后一张了');
				this.cancelRefuseWinSubmit();
			},
			viewerPrev(){
				var index=this.viewer.index;
				if (this.tableData[this.viewer.index-1])
					this.viewer.index--;
				else
					XYBase.msg('已经是第一张了');
				this.cancelRefuseWinSubmit();
			},
			resetForm:function(formName) {
				this.$refs[formName].resetFields();
			},
			handleSizeChange(val) {
				this.search.page=1;
				this.search.pageSize=val;
				this.initHtml();
			},
			cancelRefuseWinSubmit(){
				this.rowDataIndex=null;
				this.dialogVisible=false;
			},
			openRefuseWinForViewer(type,data){
				this.openRefuseWin(type,data,this.viewer.index);
			},
			openRefuseWin(type,val,index){
				this.form.type=type;
				if (type===1 || type===3){
					this.rowData=val;
					this.rowDataIndex=index;
				}
				this.viewer.index=null;
				this.dialogVisible=true;
			},
			submitForm(formName) {
				var _this=this;
				_this.$refs[formName].validate((valid) => {
					if (valid) {
						_this.form.ajax=true;
						if (_this.form.type===2) {
							_this.form.ajax=false;
							_this.dialogVisible=false;
							_this.setStatusALL(2);
						}else{
							_this.setStatus(_this.rowData,2,function(){
								_this.form.ajax=false;
								_this.dialogVisible=false;
								if (_this.form.type===3)
									_this.viewerNext();
							});
						}
					} else {
						return XYBase.warning('请先把表单填写完整。');
					}
				});
			},
			setStatus(row,status,callback){
				if (row.status=='loading') return;
				var _this=this;
				var oldStatus=row.status;
				row.status='loading';
				$.ajax({
					url:'/user/real_name/setStatus',
					type:'post',
					data:{
						id:row.id,
						status:status,
						msg:_this.form.msg
					},
					dataType:'json',
					error:function(err){
						row.status=oldStatus;
						XYBase.error(XYBase.config.system_network_error);
					},
					success:function(ret){
						row.status=oldStatus;
						if (ret) {
							if (ret.code === 0) {
								row.status=status;
								row.update_time=ret.time;
								if (status==2)
									row.msg=_this.form.msg;
								XYBase.success(ret.msg);
								if (typeof callback=='function')
									callback();
							}else XYBase.msg(ret.msg);
						}else XYBase.error(XYBase.config.system_network_error);
					}
				})
			},
			setStatusALL(status){
				var _this=this;
				if (_this.multipleSelection.length<1)return;
				loading = XYBase.openloading();
				_this.multipleSelectionIndex=0;
				_this.setStatusALLAjax(status);
			},
			setStatusALLAjax(status){
				var _this=this;
				var D=_this.multipleSelection[_this.multipleSelectionIndex];
				if (D) {
					loading.setText((_this.multipleSelectionIndex+1)+'/'+_this.multipleSelection.length);
					$.ajax({
						url:'/user/real_name/setStatus',
						type:'post',
						data:{
							id:D.id,
							status:status,
							msg:_this.form.msg
						},
						dataType:'json',
						error:function(err){
							loading.close();
							_this.multipleSelectionIndex=0;
							_this.$refs.tableList.clearSelection();
						},
						success:function(ret){
							if (ret) {
								if(ret.code === 0){
									_this.multipleSelection[_this.multipleSelectionIndex].status=status;
									_this.multipleSelection[_this.multipleSelectionIndex].update_time=ret.time;
									if (status==2)
										_this.multipleSelection[_this.multipleSelectionIndex].msg=_this.form.msg;
									_this.multipleSelectionIndex++;
									_this.setStatusALLAjax(status);
								}else{
									_this.multipleSelectionIndex++;
									_this.setStatusALLAjax(status);
								}
							}else{
								XYBase.error(XYBase.config.system_network_error);
								loading.close();
								_this.multipleSelectionIndex=0;
								_this.$refs.tableList.clearSelection();
							}
						}
					})
				}else{
					loading.close();
					_this.multipleSelectionIndex=0;
					_this.$refs.tableList.clearSelection();
					window.location.reload();
				}
			},
			handleCurrentChange(val) {
				this.search.page=val;
				this.initHtml();
			},
			sendHtml(){
				this.search.page=1;
				this.initHtml();
			},
			initHtml() {
				var _this=this;
				_this.search.ajax=true;
				$.ajax({
					url:'/user/real_name',
					type:'get',
					data:_this.search,
					dataType:'json',
					error:function(err){
						_this.search.ajax=false;
						XYBase.error(XYBase.config.system_network_error);
					},
					success:function(ret){
						_this.search.ajax=false;
						if (ret) {
							if (ret.code === 0) {
								_this.search.total=ret.data.total;
								_this.tableData=ret.data.data;
							}else{
								XYBase.msg(ret.msg);
							}
						}else{
							XYBase.error(XYBase.config.system_network_error);
						}
					}
				});
			}
		}
	});
$(function(){
	vm.initHtml();
	reloadWindowSize();
	$(window).resize(function(){
		reloadWindowSize();
	});
});
function reloadWindowSize (argument) {
	var winW=$(window).width();
	if(winW <= 576){
		vm.labelPosition='top';
	}else{
		vm.labelPosition='right';
	}
}
</script>
{/block}